The present invention relates to a musical tone signal generating apparatus for generating a musical tone signal on the basis of wave data pre-stored in a wave memory.
Conventional electronic musical instruments include a musical tone signal generating apparatus. The musical tone signal generating apparatus generates a musical tone signal on the basis of wave data pre-stored in a wave memory. The wave memory stores, for example, wave data of PCM format. PCM data is produced by sampling a musical tone wave in a predetermined cycle, quantizing it and further coding it. The PCM data is consecutively read out from the wave memory according to a tone-generating instruction, and a musical tone signal is generated on the basis of the PCM data which has been read out.
In the above musical tone signal generating apparatus, it is required to pre-store a vast amount of PCM data in the wave memory for generating musical tone signals corresponding to a great number of timbres. For decreasing the amount of wave data in amount, there have been therefore proposed methods in which PCM data is compressed and then stored in the wave memory and the compressed wave data from the wave memory is expanded when a musical tone is generated. Among them are, for example, an ADPCM (Adaptive Differential Pulse Code Modulation) method and a DPCM (Differential Pulse Code Modulation) method. In these methods, differential wave data produced by calculating a difference between the sampling data at the adjacent sampling points of a musical tone wave are stored in the wave memory, and a musical tone signal is generated by accumulating the differential wave data from the wave memory when a musical tone is generated.
It is also general practice to employ the following method in order to decrease the amount of the wave data to be stored in the wave memory. That is, only wave data of a predetermined section (attack portion) which is a leading portion of a musical tone wave and wave data of a predetermined section (a repeat portion) which comes thereafter are stored in the wave memory, as shown in FIG. 12. When a musical tone signal is generated, the attack portion is read out only once from its beginning, and then the repeat portion is repeatedly read out. A musical tone generating apparatus generates a musical tone signal on the basis of the data which has been read out.
However, the above ADPCM and DPCM methods have been scarcely employed for a musical tone signal generating apparatus for electronic musical instruments. That is because the following first and second problems are involved. The first problem is that an accumulation error occurs when the method is employed in which wave data of the repeat portion is repeatedly accumulated. The second problem is that interpolation is required between adjacent two sampling points for generating a musical tone having a desired pitch since a sampled musical tone wave is discrete while a circuit for the interpolation is complicated.
Although having the above problems, the ADPCM method or the DPCM method has been and is vigorously studied for practical use since the data can be decreased in amount. For example, U.S. Pat. No. 4,916,996 (corresponding to JP-A-62-242995) discloses a musical tone generating apparatus with reduced data storage requirements for solving the first problem. This apparatus necessarily uses last data of an attack portion at the beginning portion of a repeat portion when decoding encoded wave data which has been repeatedly read out, thereby to remove an accumulation error.
Since, however, the above apparatus requires selectors 207, 217 for assessing the beginning portion of the repeat portion and latches 206, 218 for storing data (d(n), E(n)+e.sub.r (n)) at an attack end time, it has a defect in that the circuit is complicated. Further, the method disclosed in U.S. Pat. No. 4,916,996 has a defect in that its control method is complicated when the wave data includes a plurality of repeat portions, which results in a complicated circuit.
Further, the above second problem has not yet been solved. For example, when a frequency number is fixed at "1", no interpolation is required since a wave readout address for reading out the wave data from a wave memory increments (+1) consecutively. Since, however, an actual electronic musical instrument requires a tuning function (function for shifting the pitch of an instrument as a whole in cents), a portamento function and a glide function, it is required to effect interpolation for finely controlling intervals. The interpolation requires a complicated circuit, since some pitches require a complicated control for producing a musical tone signal while making access to one sampling data a plurality of times.